#include "wopImageQImage.h"

char* wopImageQImage::loadImage(const char* filename)
{
	mImage = QImage(filename);
	if (mImage.isNull())
	{
		//TODO: error management
		return NULL;
	}

	return (char*)mImage.bits();
}

const int wopImageQImage::width() const
{
	return mImage.width();
}

const int wopImageQImage::height() const
{
	return mImage.height();
}

const unsigned char* wopImageQImage::bits() const
{
	return mImage.bits();
}